<template>
	<view class="attr-tab">
		<u-table border-color="#101010" align="left">
			<u-tr v-for="(item,idx) in attr_data" :key="idx">
				<u-td>{{item.name}}</u-td>
				<u-td>
					<block v-if="item.value_arr == ''">
						{{item.value}}
					</block>
					<block v-else>
						<view v-for="(val,idx2) in item.value_arr" :key="idx2">{{val}}</view>
					</block>
				</u-td>
			</u-tr>
		</u-table>
	</view>
</template>

<script>
	export default {
		name: 'u-attr',
		props: {
			// 属性数据
			attr_data: {
				type: Array,
				default () {
					return [];
				}
			},
		},
		watch: {},
		computed: {},
		methods: {}
	}
</script>

<style lang="scss" scoped>
	.attr-tab {
		padding: 10rpx;
	}
</style>
